package com.etoak.entity;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class Cart {

    // 菜品id
    @NotNull(message = "菜品id不能为空")
    private Integer dishesId;

    // 菜品名称
    @NotBlank(message = "菜品名称不能为空")
    private String dishesName;

    // 菜品数量
    @NotNull(message = "菜品数量不能为空")
    @Min(value = 1,message = "菜品数量最小值为1")
    private Integer count;
}
